/* Layout */
import Layout from '../views/layout/Layout';

const _import = require(`./_import_${process.env.NODE_ENV}`);

const riskRoutes = [
  {
    path: '/risk',
    component: Layout,
    redirect: 'noredirect',
    name: 'risk',
    meta: {
      title: '风控管理',
      icon: 'bug',
      roles: [],
    },
    children: [
      {
        path: 'risk-ip-query',
        name: 'risk-ip-query',
        component: _import('riskControl/ipOverlay/index'),
        meta: {
          title: 'IP重叠查询',
          roles: [],
        },
        props: route => (
          {
            username: route.query.username,
          }
        ),
      },
      {
        path: 'risk-device-id-query',
        name: 'risk-device-id-query',
        component: _import('riskControl/deviceConflict/index'),
        meta: {
          title: '同设备号查询',
          roles: [],
        },
      },
      // {
      //   path: 'risk-transfer',
      //   name: 'risk-transfer',
      //   component: _import('riskControl/transferRisk/index'),
      //   meta: {
      //     title: '会员转账风控',
      //     roles: []
      //   }
      // },
      {
        path: 'risk-withdraw',
        name: 'risk-withdraw',
        component: _import('riskControl/withdrawStrategy/strategy'),
        meta: {
          title: '会员提现风控',
          roles: ['add', 'switch', 'edit', 'del'],
        },
      },
      {
        path: 'risk-win-rate',
        name: 'risk-win-rate',
        component: _import('riskControl/awardRate/index'),
        meta: {
          title: '返奖率监控',
          roles: ['virtual'/* 虚拟数据查看 */],
        },
      },
      {
        path: 'risk-login',
        name: 'risk-login',
        component: _import('riskControl/userLogin/index'),
        meta: {
          title: '用户登录详情',
          roles: [],
        },
      },
      {
        path: 'risk-black-list',
        name: 'risk-black-list',
        component: _import('riskControl/blacklist/index'),
        meta: {
          title: '风控黑名单',
          roles: ['account-blacklist'/** *账号黑名单* */, 'blacklist-level-set'/** *黑名单群组设置* */, 'blacklist-log'/** *黑名单调整记录* */, 'blacklist-statistic'/** *黑名单统计报表* */,
            'blacklist-add'/** *添加账号黑名单* */, 'blacklist-adjust-level'/** *调整群组* */, 'add-level'/** *新增群组* */, 'delete-level'/** *删除群组* */,
            'level-setting'/** *基础设置* */, 'level-jurisdiction-setting'/** *权限设置* */,
          ],
        },
      },
      {
        path: 'black-behavior-surveillance',
        name: 'black-behavior-surveillance',
        component: _import('riskControl/behaviorSurveillance/index'),
        meta: {
          title: '黑名单行为监控',
          roles: [
            'behavior-monitor-list'/* 黑名单行为监控 */, 'blacklist-batch-lock'/* 批量锁定 */, 'blacklist-read-all'/* 全部已读 */, 'adjust-correlation-level'/* 调整关联等级 */, 'to-read'/* 设为已读 */,
          ],

        },
      },

    ],
  },
];

export default riskRoutes;
